<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>后台-图书列表</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="author" content="">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="{{ asset('/bootstrap-3.3.5-dist/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('/style/css/admin.css') }}">
</head>
<body class="docs">
@if (Auth::check()) 

<div class="search" style="max-width:60%">
    <form class="bs-example bs-example-form" role="form" action="{{ asset('admin/abooklist') }}" method="get">
    <div class="row">
        <div class="col-lg-12">
            <div class="input-group">
                <input type="text" value="" maxlength="60" name="search_text" id="search" placeholder="书名、作者、ISBN" class="form-control">
                <span class="input-group-btn">
                <button type="submit" class="btn btn-default">找书</button>
                 </span>
            </div>
        </div>
    </div>
    </form>
</div>

<table class="table table-hover">
   <caption>图书总共：</caption>
   <thead>
      <tr>
         <th>ID</th>
         <th>书名</th>
         <th>原作名</th>
         <th>副标题</th>
         <th>作者</th>
         <th>译者</th>
         <th>出版社</th>
         <th>出版年</th>
         <th>页数</th>
         <th>装帧</th>
         <th>定价</th>
         <th>ISBN</th>
         <th>丛书</th>
         <th>评分</th>
         <th>内容简介</th>
         <th>作者简介</th>
         <th>目录</th>
         <th>操作</th>
      </tr>
   </thead>
   <tbody>
    @foreach ($books as $book)
      <tr>
         <td>{{ $book->book_id }}</td>
         <td><a href="{{ URL::action('BookController@show',['id'=>$book->book_id]) }}" target="_blank">{{ $book->book_name }}</a></td>
         <td>{{ $book->yuanzuoming }}</td>
         <td>{{ $book->fubiaoti }}</td>
         <td>{{ $book->zuozhe }}</td>
         <td>{{ $book->yizhe }}</td>
         <td>{{ $book->chubanshe }}</td>
         <td>{{ $book->chubannian }}</td>
         <td>{{ $book->yeshu }}</td>
         <td>{{ $book->zhuangzhen }}</td>
         <td>{{ $book->dingjia }}</td>
         <td>{{ $book->isbn }}</td>
         <td>{{ $book->congshu }}</td>
         <td>{{ $book->pingfen }}</td>
         <td>@if($book->neirongjianjie!='') Y @else N @endif</td>
         <td>@if($book->zuozhejianjie!='') Y @else N @endif</td>
         <td>@if($book->mulu!='') Y @else N @endif</td>
         <td>
         <a href="{{ URL('admin/ainfoedit') }}/{{ $book->book_id }}">编辑</a><br/>
         <a href="{{ URL('admin/del') }}/{{ $book->book_id }}" onclick="javascript:return p_del()">删除</a>
         </td>
      </tr>
    @endforeach
   </tbody>
</table>
<div class="fenye">{!! $books->render() !!}</div>
@else
没有登录
@endif

<script language="javascript">
function p_del() {var msg="您真的确定要删除吗？\n\n请确认！";if (confirm(msg)==true){
return true;}else{return false;}}
</script>

</body>
</html>